package com.dusk.util
{
    import flash.ui.Keyboard;
    import flash.utils.describeType;
    
    public class KeyboardUtil extends UtilBase
	{
        public static function getKeyNameByKeyCode(code:uint):String
        {
            for each(var item:XML in describeType(Keyboard).constant)
            {
                if(item.@type == "uint" && Keyboard[item.@name] == code)
                {
                    return item.@name;
                }
            }
            return "unknown";
        }
	}
}
